-
Notifications
You must be signed in to change notification settings - Fork 166
Replace wget on Windows with built-in curl #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace wget on Windows with built-in curl #1016
Conversation
Signed-off-by: paulober <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the reasons why wget
was chosen over curl
initially was that it has a much nicer progress bar showing file name, download size, download speed and remaining time, whereas curl
has a very basic and ugly progress bar that provides none of the aforementioned details.
Given that we recommend and depend on wget
for many other things in the documentation and wget
can be easily installed using winget
alongside many other components that are not available on Windows, I am not convinced that this is a necessary change.
Signed-off-by: paulober <[email protected]>
Understood. The thing is if you want to integrate zephyr setup into your tooling you have other more convenient options to download the rest so then wget would only be required to run this script which is really not necessary. So what about keeping |
If you accept this solution I would also like to add it as option / fallback to macOS as it has also curl installed by default and wget would need to be installed separately. |
The question is: why is it so hard to provide |
Thanks for the clarification! I completely agree that What I’m trying to highlight is that
In contrast, both macOS and Windows already ship with So my suggestion isn’t to drop |
It does actually increase the maintenance overhead for us ensuring the identical behaviour across two different tools and dealing with the potential bug reports related to this.
Also note that you will need a lot more than just |
@nashif Sorry to bother, but could you please take a look at this discussion? My point is not to remove
I fully understand that I think having |
One way to reduce that overhead would be to standardize on the tool that is already preinstalled on two of the three supported operating systems (Windows and macOS) and also available on most Linux distributions. Then the only additional case to handle would be Linux systems where
Installing
Having multiple required dependencies doesn’t make adding another one cost-free — especially when it duplicates functionality already provided by the system. The fact that Zephyr requires Python, for example, could even argue in favor of using Python’s built-in download capabilities, rather than pulling in yet another external tool. To me, the key point is that |
As previously explained, there is a good reason why
Even if you replace Replacing
It might as well be free, don't you think?
To set up a working Zephyr build environment, in addition to
Homebrew is a very popular package manager on macOS and that is why we recommend using it. What else would you suggest then? Provide a 10-page instruction in the Getting Started Guide downloading and installing every component one by one?
So instead of imposing this seemingly irrational fear of If there is some other reason why you cannot install/provide |
I don't think we'll reach an agreement here, which is why I pinged the other maintainer for a second opinion. In the meantime, we’ve decided to go with a warning/note in the README. It’s not ideal, as it makes using Zephyr a bit less convenient, but for now it seems like the safest option: https://github.com/raspberrypi/pico-vscode/tree/main?tab=readme-ov-file#zephyr-notes |
@stephanosio Just to confirm, currently for a successful build of Zephyr for Raspberry Pi Pico-series devices across Windows, MacOS and Raspberry Pi OS, the only other dependencies needed are Regarding other dependencies, So EDIT: When I say installed, I mean by our Raspberry Pi Pico VS Code extension, which is what we're focussing on |
Ok, so if I understand correctly, all the dependencies are automatically installed by the "Raspberry Pi Pico VS Code extension" using the pre-compiled binaries from the official sources, without using package managers like Homebrew and winget?
I can see that obtaining pre-compiled Assuming your VS Code extension automatically invokes the Zephyr SDK setup script, why not just provide a wrapper for |
Yes, that's correct - currently we have no pre-requisites that the user has to install on Windows and RPi OS, and on MacOS they just need the XCode command line tools which can be installed with
Yes, that sounds like it could be a good workaround for now (@paulober could you have a look at doing that) - but we think a better fix would be this PR (expanded to other OSes) to fix the issue upstream in Zephyr, rather than hacking around with a wrapper which might break if the Zephyr download script changes the arguments it invokes |
That doesn't work because of your usage of |
Since Build
17063
(Win 10) Windows includes a curl distribution. This PR addscurl
as fallback and option towget
.See https://curl.se/windows/microsoft.html for reference.
macOS and Linux people would also benefit from this addition to the posix script.
@tdewey-rpi @will-v-pi